package c

import (
	"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
	request_model "github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
	"github.com/flipped-aurora/gin-vue-admin/server/service/c"
	"github.com/gin-gonic/gin"
)

// PostApi 内容相关接口
type PostApi struct{}

// GetPostList 获取内容列表
func (p PostApi) GetPostList(ctx *gin.Context) {
	var request = request_model.PostListRequest{}
	var errBind = ctx.ShouldBindJSON(&request)
	if errBind != nil {

	}

	var resp, errReq = c.PostServiceApp.GetPostList(request)
	if errReq != nil {
		response.FailWithMessage(errReq.Error(), ctx)
		return
	}

	response.OkWithDetailed(resp, "注册成功", ctx)
}
